<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/11/21
  Time: 20:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>注册</title>
</head>
<body>
<div>${register}</div>
<form action="/log/AdminRegisterWeb" method="post" id="form">
    账号 <input type="text" name="username" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')"
              placeholder="请输入6-12位英文或数字" id="username"><br>
    <div id="1"></div>
    密码 <input type="password" name="password" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')"
              placeholder="请输入6-12位英文或数字" id="password"><br>
    <div id="2"></div>
    <input type="submit" value="注册" id="btn" >

</form>
</body>
</html>
<script language="javascript">
    document.getElementById("form").onsubmit=function (){
        // var innerText = document.getElementById("username").valueOf().toString();
        // var innerText1 = document.getElementById("password").valueOf();
        // if(innerText==""){
        //     document.getElementById("1").innerText="请输入用户账号";
        //     return false;
        // }
        // if(innerText.length<6||innerText.length>12){
        //     document.getElementById("1").innerText="账号长度错误";
        //     return(false);
        // }
        //
        // if(innerText1==""){
        //     document.getElementById("2").innerText="请输入密码 ";
        //     return(false);
        // }
        //
        // if(innerText1.length<6||innerText1.length>12){
        //     document.getElementById("2").innerText="密码长度错误";
        //     return(false);
        // }

        return(true);
    }
</script>
